<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #root {
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 20px;
        flex-wrap: wrap;
      }
      [v-cloak] {
        display: none;
      }
    </style>
  </head>
  <body>
    <!-- 
        v-pre指令:
          1.跳过其所在节点的编译过程
          2.可利用它跳过：没有使用指令的节点，没有使用插值的节点,加快编译
  
     -->
    <div id="root">
      <div v-pre>你好</div>
      <!-- vue 不会解析下面的节点 -->
      <div v-pre>当前值为：{{n}}</div>

      <div>当前值为：{{n}}</div>
      <button @click="n++">+1</button>
    </div>

    <script src="../js/vue.js" type="text/javascript"></script>

    <script type="text/javascript">
      new Vue({
        el: "#root",
        data: {
          n: 1,
        },
      });
    </script>
  </body>
</html>
